const mongoose = require('mongoose')
const Schema = mongoose.Schema
const schema = new Schema({
  name: { type: String, required: true },
  parent: { type: mongoose.Schema.Types.ObjectId, ref: 'Category' }
})
module.exports = mongoose.model('Category', schema, 'categories')
